Some responses to this common claim gleaned from internet sources;
The idea the gospels are simply midrash has several problems associated with it. One is that the genre as such did not exist yet in Judaism as the Midrashim are a few centuries later. Now one might reformulate the idea to say that in spots midrashic technigue is displayed in the gospels. This claim would be true in spots, but need not mean the text's being "midrashed" are unhistorical. To associate texts can be a way of explaining what is or has taken place. However, most importantly, certain teachings in the New Testament cannot be explained as the product of midrash because they represent distinct takes on Jewish teaching. For example, the important idea of a resurrection in the midst of history is not a Jewish idea, but a Christian adaptation of a Jewish idea. No midrash of a text brings us to this fresh idea. Rather it is the claim of an empty tomb and appearances that does (see 1 Cor 15). Had a Jewish idea been midrashed, then Jesus could simply be a raised judge at the end of history such as the idea appears in a text like 1 Enoch. Such distinctions mean that something generated the new belief. One could claim it was simply made up, but if so why die for the idea? The other explanation is that soemthing happened that generated the new beief, which is what Christians claim took place. Either way midrash was not at work at this key juncture.
I think it's also useful to say that other parts of the New Testament, some written arguably before the gospels, clearly treat events handled in the gospels as historical, not midrash -- e.g., I Cor 15, 1John 1, 2Pet 1. Even if we might be confused as to the nature of the gospels, you wouldn't expect first century Christians to be.
It has long been an accepted dictum of New Testament scholars that the gospels are not biographies. In the sense that they do not set about their task in the way a modern biographer does this is undoubtedly true. Their records are highly selective, have only a loose chronological framework, focus one-sidedly on matters of theological significance, and tell us little or nothing about their subject's psychology or personal development. In these ways, however, they are much closer to the type of 'biography' which was fashionable in the ancient world. To commend the teaching and example of a great man by means of a selective and 'moralizing' anthology of his sayings and deeds was an accepted approach. Many such 'biographies' were of heroes long ago, and are largely mythical and valueless as historical sources; but in the case of a more recent figure there is no reason a priori why authentic historical reminiscences should not form the basis for such a 'life'.
The Jewish literary technique midrash has been applied to the gospels, with the suggestion that the source of much that they attribute to Jesus is a scripturally-inspired imagination rather than historical tradition. It must be insisted, however, (a) that 'midrash' (however that slippery word is defined) was far from being the dominant factor in Jewish writing about recent history, however strongly it may have influenced their retelling of ancient, sacred stories, and (b) that while the framework around which midrash was composed was a pre-existing sacred text, the framework of the gospels is a narrative about the recent person of Jesus, into which scriptural elements may be introduced as the narrative suggests them, rather than vice versa. There may be much to be learned by comparing the gospel writers' methods with those of midrashists, but there is no meaningful sense in which the gospels in themselves can be described in literary terms as midrash.
It is in fact widely agreed that there is no pre-existing literary category into which the gospels will fit. While they may use elements of existing techniques, and may in various respects resemble other genres, in themselves they are sui generis, a specifically Christian literary development. This means that their aims and methods are to be assessed not by extrapolation from those of other literature, but by studying them in their own terms.